package com.liwei.beans;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Stu {
    @Min(value = 1,message = "id的最小值为1")
    @Max(value = 1000,message = "id的最大值为100")
    int id;
    @NotNull(message = "name不能为空")
    @NotEmpty(message = "name不能为空字符串")
    String name;
    @Min(value = 0,message = "score最小最为0")
    @Max(value = 100,message = "score最大值为100")
    float score;
}
